package cn.unknowpupil.init.common.service;

/**
 * Created at 2021/1/14 by w10g <br>
 * Initialize QiNiuMedia ... <br>
 *
 * @author unknowpupil
 * @since 0.0.1
 */
public class QiNiuMedia {
    private static QiNiuMedia media = null;
    public static final String ACCESSKEY = "9Mycj_-gOGsKca7VSp8bikAAzfsccv9z-gHYof0y";
    public static final String SECRETKEY = "qYlexkSZB3aBYtHdPu0snRkCbmgkOBtRlHzK-Ng3";
    public static final String BUCKETNAME = "gaogedianzi";
    public static final String DOMAIN = "http://equip.yunfandavip.com/";
    // 设置accessKey
    private String accessKey;
    // 设置secretKey
    private String secretKey;
    // 设置存储空间
    private String bucketName;
    // 设置七牛域名
    private String domain;

    public String getAccessKey() {
        return accessKey;
    }

    public void setAccessKey(String accessKey) {
        this.accessKey = accessKey;
    }

    public String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    public String getBucketName() {
        return bucketName;
    }

    public void setBucketName(String bucketName) {
        this.bucketName = bucketName;
    }

    public String getDomain() {
        return domain;
    }

    public void setDomain(String domain) {
        this.domain = domain;
    }

    /**
     * 实例化一个QiNiuMedia实例
     * @uesr "xinzhifu@knet.cn"
     * @date 2016年11月19日下午2:58:27
     */
    public static synchronized QiNiuMedia getInstance() {
        if (media == null) {
            media = new QiNiuMedia();
            media.setAccessKey(ACCESSKEY);
            media.setSecretKey(SECRETKEY);
            media.setBucketName(BUCKETNAME);
            media.setDomain(DOMAIN);
        }
        return media;
    }
}
